Method and device for simplifying the encoding and decoding of ultra-high definition images

ABSTRACT

Provided are an encoding device using predictive coding in a screen and a method thereof, and a decoding device and a method thereof. The encoding device is capable of generating a prediction block of a current block according to one of methods for generating a plurality of predetermined prediction blocks, and outputting at least one of encoding information and differential blocks as bitstream by entropy encoding according to whether differential blocks are encoded or not.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of U.S. patentapplication Ser. No. 15/712,835 filed on Sep. 22, 2017, which is aContinuation Application of U.S. patent application Ser. No. 13/990,190filed on May 29, 2013, now U.S. Pat. No. 9,794,556 issued on Oct. 17,2017, which is a national stage application of, InternationalApplication No. PCT/KR2011/009167, filed on Nov. 29, 2011 which claimsthe benefit under 35 U.S.C. § 119(a) of Korean Patent Application No.10-2010-0124368, filed on Dec. 7, 2010, in the Korean IntellectualProperty Office, the entire disclosures of which are incorporated hereinby reference for all purposes.

BACKGROUND Technical Field

The present invention relates to a technology capable of loweringcalculation complexity and improving encoding efficiency at the time ofperforming intra prediction encoding on an ultrahigh definitionresolution image.

Background Art

A broadcast service having high definition (HD) resolution such as1280×1024, 1920×1080, etc., has been expanded in the country and aroundthe world. Therefore, users require contents having higher resolutionand better quality of image such as 4K (3840×2160), 8K (7680×4320), orthe like, so as to watch a more realistic image.

The number of pixels of a 4K image is four times larger than that of anHD image, and the number of pixels of an 8K (7680×4320) is sixteen timeslarger than that of the HD image. Therefore, the 4K and 8K images can bedisplayed delicately and naturally, as compared with the image havingthe HD resolution. Generally, in order to encode the 4K or 8K image,H.264/AVC (MPEG-4 Part 10 Advanced Video Coding) has been used. As such,as the resolution of an image is increased, inter-pixel spatialcorrelation may be largely increased.

FIG. 1 is a diagram showing comparison results of the number of pixelused to display a portion of the image, on the basis of each resolution.

In FIG. 1 , when the number of pixels used to display a portion of animage is four in 480×270 resolution above QVGA (352×288) resolution, thenumber of pixels used to display a portion of an image is nine andtwenty five, respectively, in FULL HDTV (1920×1980). Further, a portionof an image is displayed by 100 pixels in the 4K (3840×2160) resolution,and a portion of an image is displayed by 361 pixels in the 8K(7680×4320) resolution. As such, in the image of the 4K and 8Kresolution, the number of pixels used to display a portion of a specificimage is excessively large. In other words, the image of the 4K and 8Kresolution has inter-pixel correlation much higher than that of theimage of the HD resolution or less. In particular, the inter-pixelcorrelation is higher in an image having flat characteristics ratherthan having complicated characteristics or a portion of the image.

As such, when performing the intra prediction in an ultrahigh definitionresolution image having the very high inter-pixel correlation such as4K, 8K, or the like, pixel values of current blocks may be almostpredicted by using only pixel values of peripheral blocks. Therefore,when the inter-pixel correlation is high, a process of encoding anddecoding residual blocks is a factor of the increase in calculationcomplexity and the reduction in encoding efficiency.

Therefore, when encoding and decoding the ultrahigh definitionresolution image having the inter-pixel correlation, a need exists foran encoding and decoding technology capable of improving the encodingefficiency while reducing the calculation complexity.

SUMMARY Technical Problem

The present invention provides an encoding apparatus and method and adecoding apparatus and method capable of reducing calculation complexityaccording to intra prediction encoding for an ultrahigh definitionresolution image having high inter-pixel correlation.

The present invention also provides an encoding apparatus and method anda decoding apparatus and method capable of improving decoding efficiencyby performing encoding and decoding using prediction blocks having thebest encoding efficiency among a plurality of prediction blocks.

Technical Solution

In an aspect, there is provided an encoding apparatus including: anintra prediction unit that generates prediction blocks of current blocksbased on a reference image; a subtraction unit that generates residualblocks through a difference between the current blocks and theprediction blocks; an encoding information generation unit thatgenerates encoding information representing whether residual blocks areencoded based on whether the residual blocks are encoded; and an entropydecoding unit that performs entropy encoding on at least one of theresidual blocks and the encoding information based on the encodinginformation.

The entropy encoding may generate bitstreams by encoding only theencoding information when the encoding information includes informationrepresenting that the residual blocks are not encoded.

The intra prediction unit may generate the prediction blocks by usingany one of methods for generating a plurality of prediction blocks.

The intra prediction unit may generate a plurality of prediction blocksof the current blocks according to the methods for generating aplurality of prediction blocks.

The intra prediction unit may generate the prediction blocks of thecurrent blocks in plural, based on the methods for generating predictionblocks used at the time of generating the prediction blocks of each ofthe recovered peripheral blocks.

The encoding apparatus may include a prediction block selection unitthat selects any one of the generated prediction blocks of the pluralityof current blocks.

In another aspect, there is provided an encoding method, including:generating prediction blocks of current blocks based on a referenceimage; generating residual blocks through a difference between thecurrent blocks and the prediction blocks; generating encodinginformation representing whether residual blocks are encoded based onwhether the residual blocks are encoded; transforming and quantizing theresidual blocks based on the encoding information; and performingentropy encoding on at least one of the residual blocks and the encodinginformation based on the encoding information.

The entropy encoding may generate bitstreams by encoding only theencoding information when the encoding information includes theinformation representing that the residual blocks are not encoded.

The generating of the prediction blocks may generate the predictionblocks of the current blocks in plural according to methods forgenerating a plurality of prediction blocks.

The generating of the prediction blocks may generate at least one of theprediction blocks of the current blocks based on the methods forgenerating prediction blocks used at the time of generating theprediction blocks of each of decoded peripheral blocks.

The encoding method may further include selecting any one of theprediction blocks having the best encoding efficiency among thegenerated prediction blocks of the current blocks.

In still another aspect, there is provided a decoding apparatus,including: an entropy decoding unit that decodes encoding informationextracted from bitstreams; an intra prediction unit that generatesprediction blocks of current blocks by using decoded peripheral blocks;an adding unit that recovers the current blocks by using at least one ofdecoded residual blocks and the prediction blocks of the current blocksbased on the decoded encoding information.

The adding unit may recover the current blocks by using only theprediction blocks of the current blocks when the encoding informationincludes information representing that the residual blocks are notencoded.

In still another aspect, there is provided a decoding method, including:extracting at least one of encoding information encoded from bitstreamsand prediction block selection information; decoding the encodedinformation and the prediction block selection information; generatingthe prediction blocks of the current blocks by using the decodedperipheral blocks; selecting any one of the prediction blocks of thecurrent blocks based on the decoded prediction block selectioninformation; and recovering the current blocks by using at least one ofthe decoded residual blocks and the prediction blocks of the selectedcurrent blocks based on the decoded encoding information.

Advantageous Effects

As set forth above, the exemplary embodiments of the present inventioncan reduce the calculation complexity according to the output of thebitstreams by using the prediction blocks of the current blocks at thetime of performing the intra prediction encoding on the ultrahighdefinition resolution image having the high inter-pixel correlation.

Further, the exemplary embodiments of the present invention can improvethe encoding efficiency by performing the encoding and decoding usingthe prediction blocks having the best encoding efficiency among theplurality of prediction blocks.

DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram showing comparison results of the number of pixelsused to display a portion of an image, on the basis of each resolution.

FIG. 2 is a diagram showing a configuration of an encoding apparatusaccording to the embodiment of the present invention.

FIG. 3 is a diagram showing an overall configuration of an encodingapparatus according to the embodiment of the present invention.

FIG. 4 is a flow chart for describing an operation of the encodingapparatus according to the embodiment of the present invention.

FIG. 5 is a block diagram showing a configuration of a decodingapparatus according to the embodiment of the present invention.

FIG. 6 is a diagram showing the overall configuration of the encodingapparatus according to the embodiment of the present invention.

FIG. 7 is a flow chart for describing an operation of the decodingapparatus according to the embodiment of the present invention.

FIG. 8 is a diagram showing a configuration of the encoding apparatusaccording to the embodiment of the present invention.

FIG. 9 is a flow chart for describing an operation of the encodingapparatus according to the embodiment of the present invention.

FIG. 10 is a block diagram showing a configuration of the decodingapparatus according to the embodiment of the present invention.

FIG. 11 is a flow chart for describing an operation of the decodingapparatus according to the embodiment of the present invention.

DETAILED DESCRIPTION

Hereinafter, exemplary embodiments of the present invention will bedescribed in detail with reference to the accompanying drawings.However, the present invention is not limited to exemplary embodimentsdescribed below. In addition, like reference numerals provided in eachdrawing denotes like components.

FIG. 2 is a diagram showing a configuration of an encoding apparatusaccording to the embodiment of the present invention.

In FIG. 2 , an input image having a size of 16×16 pixels in a width anda length may be processed in an encoding unit. In this case, theencoding apparatus may output bitstreams generated through intraprediction encoding or inter prediction encoding. First, a process ofthe intra prediction encoding process will be described with referenceto FIG. 2 and a process of inter prediction encoding will be describedwith reference to FIG. 3 .

Referring to FIG. 2 , an encoding apparatus 200 may include an intraprediction unit 210, a reference image buffer 220, a subtraction unit230, an encoding information generation 240, a conversion andquantization unit 250, an entropy encoding unit 260, a dequantizationand inverse transform unit 270, and an adding unit 280.

The intra prediction unit 210 may generate the prediction blocks of thecurrent blocks based on a reference image stored in the reference imagebuffer 220. In this case, when using peripheral blocks recovered to thereference image, the intra prediction unit 210 may generate theprediction blocks of the current blocks by using any one of a pluralityof methods for generating a plurality of predetermined prediction blocksand pixel values of peripheral blocks that are spatially adjacent to thecurrent blocks.

For example, (1) the intra prediction unit 210 copies (pads) the pixelsof the peripheral blocks adjacent to the current blocks to generate theprediction blocks of the current blocks. In this case, the pixels copied(padded) to the current blocks may be changed according to the predicteddirection, and the predicted direction information may be encoded so asto be included in the bitstreams. In other words, the intra predictionunit 210 may generate the prediction blocks of the current blocks byusing the intra prediction method of H.264/AVC.

As another example, (2) the intra prediction unit 210 may determine theprediction direction based on similarity between the current blocks andthe peripheral blocks and copy the pixels of the peripheral blocksaccording to the determined prediction direction to generate theprediction blocks of the current blocks. In other words, the intraprediction unit 210 may select the peripheral blocks positioned in thedetermined prediction direction among the plurality of peripheral blocksadjacent to the current blocks and copy the pixels of the selectedperipheral blocks, thereby generating the prediction blocks of thecurrent blocks.

As another exemplary embodiment, (3) the intra prediction unit 210 mayextract the blocks most similar to the current blocks by matching in acurrent screen region in which the encoding is performed in advance.Further, the intra prediction unit 210 may generate the predictionblocks of the current blocks by using the extracted blocks. In thiscase, difference information on a position between the current blocksand the prediction blocks of the current blocks may be included in thebitstreams.

As another exemplary embodiment, (4) the intra prediction unit 210 maysearch a type most similar to the peripheral blocks in the currentscreen region in which the encoding is performed in advance and maygenerate the blocks enclosed by the searched type as the predictionblocks of the current blocks.

As another exemplary embodiment, (5) the intra prediction unit 210 mixesmethods for generating a plurality of predetermined prediction blocks togenerate the prediction blocks of the current blocks. In this case, theintra prediction unit 210 may generate the prediction blocks by using anaverage value of the prediction blocks generated by the above methodsfor generating the plurality of prediction blocks. In addition, theprediction blocks may be generated by a sum of weight values accordingto each of the methods for generating the plurality of predictionblocks.

The subtracting unit 230 may generate residual blocks by subtracting thecurrent blocks and the prediction blocks of the current blocks.

The encoding information generation unit 240 may generate the encodinginformation based on whether the residual blocks are encoded. As anexample, in order to determine whether the residual blocks are encodedor not, the similarity between the current blocks and the predictionblocks of the current blocks, or the like, may be used.

When the similarity between the current blocks and the prediction blocksof the current blocks is used, the encoding information generation unit240 may calculate the similarity between the current blocks and theprediction blocks of the current blocks by using sum of absolutedifference (SAD), sum of absolute transformed differences (SATD), sum ofsquared difference (SSD), or the like. Further, the encoding informationgeneration unit 240 may generate the encoding information based on thecalculated similarity.

Herein, the encoding information may include information representingwhether the residual blocks are encoded or not.

For example, when the similarity between the current blocks and theprediction blocks of the current blocks is the reference similarity ormore, the encoding information generation unit 240 may generate theencoding information including the information representing that theresidual blocks are not encoded.

As another example, when the similarity between the current blocks andthe prediction blocks is less than the reference similarity, theencoding information generation unit 240 may generate the encodinginformation including the information representing that the residualblocks are encoded.

Then, the transform and quantization unit 250 may transform and quantizethe residual blocks based on the encoding information. Further, theentropy encoding unit 260 may perform the entropy encoding on at leastone of the encoding information and the residual blocks based on theencoding information to generate the bitstreams.

For example, when the encoding information includes the informationrepresenting that the residual blocks are not encoded, the transform andthe quantization unit 250 cannot transform and quantize the residualblocks. Then, the entropy encoding unit 260 may perform the entropyencoding on only the encoding information without the residual blocks togenerate the bitstreams. Therefore, the calculation complexity and theencoding time may be reduced by not transforming and quantizing theresidual blocks. As such, when the encoding information includes theinformation representing that the residual blocks are not encoded, thegenerated bitstreams may include the encoded information.

As another example, when the encoding information includes theinformation representing that the residual blocks are encoded, thetransform and the quantization unit 250 can transform and quantize theresidual block. Then, the entropy decoding unit 260 may perform theentropy encoding on the transformed and quantized residual blocks andperform the entropy encoding on the encoding information. Further, theentropy encoding unit 260 may generate the bitstreams by mixing theencoded residual blocks and the encoded encoding information. As such,when the encoding information includes the information representing thatthe residual blocks are encoded, the generated bitstreams may includethe encoded residual blocks and the encoded encoding information.

In this case, the transform and quantization unit 250 may differentlyperform the transform and quantization on the residual blocks accordingto the intra prediction encoding mode.

For example, when using 16×16 intra prediction encoding, the transformand quantization unit 250 may transform the residual blocks to generatea transform coefficient and collect a DC coefficient among the generatedtransform coefficients to perform Hadamard transform. Then, the entropyencoding unit 260 may perform the entropy encoding on only the Hadamardtransformed DC coefficient to output the bitstreams.

As another example, when using the 8×8 and 4×4 intra prediction encodingmode other than 16×16, the transform and quantization unit 250transforms the residual blocks to generate the transform coefficient andquantizes the generated transform coefficient according to quantizationparameters to generate the quantized coefficient. Then, the entropyencoding unit 260 may perform the entropy encoding on the generatedquantized coefficient according to a probability distribution to beoutput as the bitstreams.

The dequantization and inverse transform unit 270 may perform thedequantization and inverse transform on the quantized coefficient outputfrom the transform and quantization unit 250 to decode the residualblocks.

Further, the adding unit 280 adds the decoded residual blocks to theprediction blocks of the current blocks to recover the current blocks.Then, the reference image buffer 220 may store the recovered currentblocks.

As such, the peripheral blocks recovered at the previous stage may bestored as the reference block in the reference image buffer 220 sincethe recovered current blocks are stored in the reference image buffer220.

Then, when the encoding information includes the informationrepresenting that the residual blocks are not encoded, the recoveredperipheral blocks stored in the reference image buffer 220 are blocksrecovered by using only the prediction blocks of the peripheral blocks.Then, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the recoveredperipheral blocks stored in the reference image buffer 220 are blocksrecovered by using the residual blocks and the prediction blocks of theperipheral blocks. Therefore, the intra prediction unit 210 may generatethe prediction blocks of the current blocks by using the peripheralblocks recovered by using only the prediction blocks of the peripheralblocks according to the encoding information or the peripheral blocksrecovered by using the recovered residual blocks and the predictionblocks of the peripheral blocks.

Although FIG. 2 describes the configuration of performing the intraprediction encoding on the input image for convenience of explanation, aconfiguration of performing the intra prediction encoding and the interprediction encoding will be described with reference to FIG. 3 .

FIG. 3 is a diagram showing the overall configuration of the encodingapparatus according to the embodiment of the present invention.

Components of FIG. 3 are substantially the same as the componentsmentioned with reference to the operation of FIG. 2 and therefore, therepeated description thereof will be omitted. An encoding apparatus 300of FIG. 3 may further include a motion prediction unit 310, a motioncompensation unit 320, and a deblocking unit 350 in the encodingapparatus 200 of FIG. 2 .

The motion prediction unit 310 may search a region optimally matchedwith the current blocks among the reference images by using variousmotion estimation algorithms such as a block matching algorithm (BMA),phase correlation, HSBMA, or the like, to thereby calculate a motionvector.

Then, the motion compensation unit 320 may use the calculated motionvector to perform the motion compensation, thereby generating theprediction blocks of the current blocks. As such, the encoding apparatusaccording to the embodiment of the present invention may perform theinter prediction encoding through the motion prediction andcompensation. Then, the subtracting unit 330 may generate the residualblocks by subtracting the prediction blocks of the current blocks andthe current blocks that are generated through the inter predictionencoding or the intra prediction encoding.

The adding unit 340 may recover the current blocks by using at least oneof the prediction blocks of the current blocks and the recoveredresidual blocks. Further, the recovered current blocks may be stored inthe reference image buffer.

For example, when the residual blocks are not transformed and quantizedin the transform and quantization unit, the adding unit 340 may recoverthe current blocks only by using the prediction blocks of the currentblocks. As another example, when the residual blocks are transformed andquantized in the transform and quantization unit, the adding unit 340may recover the current blocks by adding the prediction blocks of thecurrent blocks and the residual blocks.

Then, the deblocking unit 350 may remove a blocking artifact in thecurrent blocks recovered using the deblocking filter to be stored in thereference image buffer.

In FIG. 3 the inter prediction encoding is divided into the 16×16, 16×8,8×16, and 8×8 inter prediction encoding modes and the 8×8 interprediction mode may back be divided into the 8×8, 8×4, 4×8, and 4×4 subinter prediction encoding mode.

FIG. 4 is a flow chart for describing an operation of the encodingapparatus according to the embodiment of the present invention.

First, at S410, the intra prediction unit 210 may generate theprediction blocks of the current blocks based on the reference image.

For example, the intra prediction unit 210 may generate the predictionblocks of the current blocks by using any one of the predefined methodsfor generating the plurality of prediction blocks. Here, the recoveredperipheral blocks may use the reference image. In this case, therecovered peripheral blocks may be blocks that are recovered using onlythe prediction blocks of the peripheral blocks or recovered using theprediction blocks of the peripheral blocks and the decoded residualblock. Further, the intra prediction unit 210 may generate theprediction blocks of the current blocks by using the recoveredperipheral blocks.

Then, at S420, the subtracting unit 230 may subtract the current blocksand the prediction blocks of the current blocks to generate the residualblock.

Further, at S430, the encoding information generation unit 240 maygenerate the encoding information based on whether the residual blocksare encoded. In this case, whether the residual blocks are encoded maybe determined based on the similarity between the current blocks and theprediction blocks of the current blocks, or the like.

For example, when the similarity is used, the encoding informationgeneration unit 240 may calculate the similarity between the currentblocks and the prediction blocks of the current blocks by using the sumof absolute difference (SAD), the sum of absolute transformeddifferences (SATD), the sum of squared difference (SSD), or the like.Further, the encoding information generation unit 240 may generate theencoding information based on the calculated similarity.

In this case, when the calculated similarity is above a referencesimilarity, the encoding information generation unit 240 may generatethe encoding information so as to include the information representingthat the residual blocks are not encoded. Further, when the calculatedsimilarity is below the reference similarity, the encoding informationgeneration unit 240 may generate the encoding information so as toinclude the information representing that the residual blocks areencoded.

Then, at S440, the transform and quantization unit 250 may transform andquantize the residual blocks based on the encoding information.

In this case, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the transform and thequantization unit 250 can transform and quantize the residual blocks.

Further, when the encoding information includes the informationrepresenting that the residual blocks are not encoded, the transform andthe quantization unit 250 cannot transform and quantize the residualblocks.

Then, at S450, the entropy encoding unit 260 may perform the entropyencoding on at least one of the transformed and quantized residualblocks and encoding information to be output as the bitstreams.

For example, when the residual blocks are transformed and quantizedbased on the encoding information, the entropy encoding unit 260 mayperform the entropy encoding on the transformed and quantized residualblocks and perform the entropy encoding on the encoding information.Further, the entropy encoding unit 260 may transmit the bitstreamsgenerated by mixing the encoded residual blocks and the encodedinformation to a decoding apparatus.

As another example, when the residual blocks are not transformed andquantized based on the encoding information, the entropy encoding unit260 may perform the entropy encoding on only the encoding informationwithout the residual blocks to be output as the bitstreams.

FIG. 5 is a block diagram showing a configuration of a decodingapparatus according to the embodiment of the present invention.

Referring to FIG. 5 , a decoding apparatus 500 may include an intraprediction unit 510, a reference image buffer 520, an entropy decodingunit 530, a dequantization and inverse transform unit 540, and an addingunit 550.

The intra prediction unit 510 may generate the prediction blocks of thecurrent blocks based on the reference image. In this case, the intraprediction unit 520 may generate the prediction blocks of the currentblocks by using any one of the predefined methods for generating theplurality of prediction blocks. Here, the predefined methods forgenerating a plurality of prediction blocks are described in advance inthe intra prediction unit 210 of FIG. 2 , and the repeated descriptionthereof will be omitted.

The intra prediction unit 510 may generate the prediction blocks of thecurrent blocks based on a reference image stored in the reference imagebuffer 520. In this case, the recovered peripheral blocks may be blocksthat are recovered using only the prediction blocks of the peripheralblocks or recovered using the prediction blocks of the prediction blocksand the decoded residual block.

The entropy decoding unit 530 may demultiplex the bitstreams to extractthe encoded information and perform the entropy decoding on the encodedinformation.

In this case, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the entropy decodingunit 530 may extract the encoded information and the encoded residualblocks while demultiplexing the bitstreams. Further, the entropyencoding unit 530 may decode the encoded information and decode theencoded residual block.

Further, when the encoding information includes the informationrepresenting that the residual blocks are not encoded, the entropydecoding unit 530 may extract the encoded information whiledemultiplexing the bitstreams. That is, when the encoding informationincludes the information representing that the residual blocks are notencoded, encoded residual blocks may not be included in the bitstreams.Therefore, the entropy decoding unit 530 may perform the entropydecoding on only the encoded encoding information.

The dequantization and inverse transform unit 540 may perform thedequantization and the inverse transform based on the decoded encodinginformation to decode the residual blocks.

For example, when the encoding information does not include theinformation representing that the residual blocks are not encoded, thedequantization and inverse transform unit 540 may perform thedequantization on the encoded residual blocks by using variable lengthdecoding based on the probability distribution to output the quantizedcoefficient.

In this case, the output quantized coefficient may include only the DCcoefficient information and may include both of the DC coefficientinformation the AC coefficient information.

As another example, when the encoding information includes theinformation representing that the residual blocks are not encoded, thedequantization and inverse transform unit 540 cannot be operated sincethere are no encoded residual blocks extracted from the bitstreams. Inother words, the dequantization and inverse transform unit 540 may beoperated only when the encoded residual blocks are included in thebitstreams.

The adding unit 550 may recover the current blocks by using at least oneof the residual blocks decoded based on the encoding information and theprediction blocks of the current blocks.

For example, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the adding unit 550may recover the current blocks by adding the recovered residual blocksand the prediction blocks of the current blocks.

As another example, when the encoding information includes theinformation representing that the residual blocks are not encoded, theadding unit 550 may recover the current blocks by using only theprediction blocks of the current blocks generated in the intraprediction unit 510.

The reference image buffer 520 may store the recovered current blocks.

FIG. 6 is a diagram showing the overall configuration of the decodingapparatus according to the embodiment of the present invention.

Components of FIG. 6 are substantially the same as the componentsmentioned with reference to the operation of FIG. 5 and therefore, therepeated description thereof will be omitted. A decoding apparatus 600of FIG. 6 may further include a motion compensation unit 610 and adeblocking unit 620 in the decoding apparatus 500 of FIG. 5 .

The motion compensation unit 610 may perform the motion compensation onthe reference image by using a motion vector extracted from thebitstreams through the entropy decoding. Further, the motioncompensation unit 610 may generate the prediction blocks of the currentblocks through the motion compensation.

The deblocking unit 620 may remove the blocking artifact from therecovered current blocks to output the recovered image. Further, therecovered image may be stored in the reference image buffer.

FIG. 7 is a flow chart for describing an operation of the decodingapparatus according to the embodiment of the present invention.

First, at S710, the intra prediction unit 510 may generate theprediction blocks of the current blocks based on the reference image.

The intra prediction unit 510 may generate the prediction blocks of thecurrent blocks based on a reference image stored in the reference imagebuffer 520. In this case, the intra prediction unit 510 may generate theprediction blocks of the current blocks according to any one of thepredefined methods for generating a plurality of prediction blocks, asalready described in the intra prediction unit 210 of FIG. 2 .

Then, at S720, the entropy decoding unit 530 may demultiplex thebitstreams to extract the encoded information.

Further, at S730, the entropy decoding unit 530 may perform the entropydecoding on the encoded information. Here, the encoding information mayinclude the information representing that the residual blocks areencoded or the information representing that the residual blocks are notencoded.

In this case, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the entropy decodingunit 530 may extract the encoded residual blocks from the bitstreams toperform the entropy decoding.

Then, at S740, the dequantization and inverse transform unit 540 mayperform the dequantization and inverse transform on the residual blocksbased on the decoded encoding information.

For example, the encoding information includes the informationrepresenting that the residual blocks are encoded, the dequantizationand inverse transform unit 540 performs the dequantization on theencoded residual blocks and then performs the inverse transform thereon,thereby recovering the residual blocks.

As another example, when the encoding information includes theinformation representing that the residual blocks are not encoded, theoperation of the dequantization and inverse transform unit 540 may beomitted since there are no residual blocks extracted from thebitstreams. In other words, the dequantization and inverse transformunit 540 may be operated only when the encoded residual blocks areincluded in the bitstreams. Therefore, the calculation complexity of thedecoding apparatus may be reduced and the decoding time may beshortened.

At S750, the adding unit 750 may recover the current blocks based on atleast one of the prediction blocks of the current blocks and therecovered residual blocks.

For example, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the adding unit 550may recover the current blocks by adding the prediction blocks of thecurrent blocks and the recovered residual blocks. Then, the currentblocks that are the recovered image may be displayed.

As another example, when the encoding information includes theinformation representing that the residual blocks are not encoded, theadding unit 550 may recover the current blocks only by using theprediction blocks of the current blocks. In other words, the recoveredimage may consist of only the prediction blocks of the current blocks.

Up to now, the configuration of generating the prediction blocks of thecurrent blocks using any one of the predefined methods of generating aplurality of prediction blocks has been described with reference toFIGS. 2 to 7 . In particular, the encoding and decoding apparatusaccording to the embodiment of the present invention describes theconfiguration of recovering the current blocks by using only theprediction blocks of the current blocks based on whether the residualblocks are encoded.

Hereinafter, the configuration of generating the prediction blocks ofthe current blocks according to the method for generating the predictionblocks used at the time of generating the prediction blocks of theperipheral blocks or the predetermined methods for generating aplurality of prediction blocks and performing the encoding and decodingby selecting any one among the prediction blocks of the current blockswill be described.

FIG. 8 is a diagram showing a configuration of the encoding apparatusaccording to the embodiment of the present invention.

FIG. 8 further includes the prediction block selection unit in theencoding apparatus of FIG. 2 , wherein the operation of the intraprediction unit is different from the intra prediction unit of FIG. 2 .Therefore, the description of the repeated portion with FIG. 2 amongcomponents of FIG. 8 will be omitted and the prediction block selectionunit and the intra prediction unit will be mainly described.

Referring to FIG. 8 , an encoding apparatus 800 may include an intraprediction unit 810, a reference image buffer 820, a prediction blockselection unit 830, a subtraction unit 840, an encoding informationgeneration unit 850, a conversion and quantization unit 860, an entropyencoding unit 870, a dequantization and inverse transform unit 880, andan adding unit 890.

The intra prediction unit 810 may generate more than one predictionblock of the current blocks by using the reference image stored in thereference image buffer 820. In this case, the intra prediction unit 810may generate the prediction blocks of the current blocks according tothe predefined methods for generating a plurality of prediction blocksbased on the number of the methods for generating prediction blocks usedat the time of generating the prediction blocks of the peripheral blocksor the method for generating prediction blocks used at the time ofgenerating the prediction blocks of each of the recovered peripheralblocks.

For example, when the methods for generating prediction blocks used atthe time of generating the prediction blocks of the peripheral blocksare the same, the intra prediction unit 810 may generate the predictionblocks of the current blocks according to the method for generating theprediction blocks of the peripheral blocks equally used. In other words,when the prediction blocks of the peripheral blocks are generatedaccording the intra prediction method 1, the intra prediction unit 810may generate the prediction blocks of the current blocks by using thereference image according to the intra prediction method 1. Then, theprediction block selection unit 830 may output the prediction blocks ofthe generated current blocks as they are since the prediction block ofthe generated current blocks is one.

As another example, when the number of methods for generating theprediction blocks used at the time of generating the prediction blocksof the peripheral blocks is two or less, the intra prediction unit 810may generate the prediction blocks of the current blocks according tothe two methods for generating two prediction blocks used at the time ofgenerating the prediction blocks of the peripheral blocks.

Then, the prediction block selection unit 830 may select the predictionblock having good encoding efficiency among the two prediction blocks ofthe current blocks. For example, the prediction block selection unit 830may select the prediction block having good encoding efficiency by usingthe similarity between the prediction blocks of the current blocks andthe current blocks, rate-distortion cost, or the like. Further, theprediction block selection unit 830 may generate the prediction blockselection information including the information representing the methodfor generating prediction blocks used at the time of generatingprediction blocks of the selected current blocks. In this case, theprediction block selection unit 830 may calculate the similarity byusing SAD, SSD, SATD, or the like.

As another example, when the number of methods for generating predictionblocks used at the time of generating the prediction blocks of theperipheral blocks is three or more, the intra prediction unit 810 maygenerate a plurality of prediction blocks of the current blocksaccording to the predefined methods for generating a plurality ofprediction blocks.

For example, when the methods for generating prediction blocks (1) to(5) described in the intra prediction unit 210 are used, the intraprediction unit 810 may generate 5 prediction blocks of the currentblocks using the 5 predefined methods for generating prediction blocks.

In other words, when the methods for generating prediction blocks usedat the time of generating the prediction blocks of the peripheral blocksare three or more, the intra prediction unit 810 may generate theprediction blocks of the current blocks by using the predefined methodsfor generating a plurality of prediction blocks instead of the methodfor generating prediction blocks used at the prediction blocks of theperipheral blocks.

Then, the prediction block selection unit 830 may select any one of theprediction blocks having the best encoding efficiency among theprediction blocks of the current blocks. Further, the prediction blockselection unit 830 may generate the prediction block selectioninformation including the information representing the method forgenerating prediction blocks used at the time of generating predictionblocks of the selected current blocks.

The subtraction unit 840 may subtract the prediction blocks of theselected current blocks and the current blocks to generate the residualblocks.

The encoding information generation unit 850 may generate the encodinginformation based on whether the residual blocks are encoded. As anexample, in order to determine whether the residual blocks are encodedor not, the similarity between the current blocks and the predictionblocks of the current blocks, or the like, may be used.

Herein, the encoding information may include information representingwhether the residual blocks are encoded or not.

Then, the transform and quantization unit 860 may transform and quantizethe residual blocks based on the encoding information.

The entropy encoding unit 870 performs the entropy encoding on at leastone of the encoding information, the prediction block selectioninformation, and the residual blocks. For example, when the residualblocks are not encoded, the entropy encoding unit 870 may encode theencoding information and the prediction block selection information tobe output as the bitstreams. Further, when the residual blocks areencoded, the encoding information, the prediction block selectioninformation, and the residual blocks are subjected to the entropyencoding to be output as the bitstreams.

The dequantization and inverse transform unit 880 may perform thedequantization and the inverse transform on the transformed andquantized residual blocks to recover the residual block.

The adding unit 890 may recover the current block by adding the residualblocks recovered based on the encoding information and the predictionblocks of the selected current blocks. Then, the reference image buffer820 may store the recovered current block. In this case, when theresidual blocks are not encoded, the adding unit 890 may recover thecurrent blocks by using only the prediction blocks of the selectedcurrent blocks.

FIG. 9 is a flow chart for describing an operation of the encodingapparatus according to the embodiment of the present invention.

First, at S910, the prediction block generation unit 810 may generate atleast one prediction block of the current block using the referenceimage.

For example, the intra prediction unit 810 may generate the predictionblocks of the current blocks according to the method for generatingprediction blocks used at the time of generating the prediction blocksof each of the plurality of recovered peripheral blocks.

As another example, the intra prediction unit 810 may generate theplurality of prediction blocks of the current blocks according to thepredetermined methods for generating the plurality of prediction blocksbased on the number of the methods for generating the prediction blocksused at the time of generating the prediction blocks of the peripheralblocks.

Then, at S920, the prediction block selection unit 820 may select anyone of the prediction blocks of the current blocks according to thegeneration of the prediction blocks of the plurality of current blocks.

In this case, the prediction block selection unit 820 may select theprediction blocks having the best encoding efficiency among theprediction blocks of the current blocks.

For example, when the similarity between the current blocks and thegenerated current blocks are used, it may be determined that predictionblocks with the increased similarity have good encoding efficiency.Therefore, the prediction block selection unit 820 may select theprediction blocks having the highest similarity among the predictionblocks of the current blocks.

As another example, the prediction block selection unit 820 may selectthe prediction blocks having the best encoding efficiency by using therate-distortion cost.

Further, at S930, the subtracting unit 840 may subtract the predictionblocks of the selected current blocks and the current blocks to generatethe residual blocks.

Next, at S940, the encoding information generation unit 850 may generatethe encoding information based on whether the residual block is encoded.

Further, at S950, the transform and quantization unit 860 may transformand quantize the residual block based on the encoding information.

Then, at S960, the entropy encoding unit 870 may perform the entropyencoding on at least one of the encoding information, the predictionblock selection information, and the residual blocks.

For example, when the residual blocks are encoded, the entropy encodingunit 870 performs the entropy encoding on each of the encodinginformation, the prediction block selection information, and thetransformed and quantized residual blocks and mixes the encodedinformation, the encoded prediction block selection information, and theencoded residual blocks to be output as the bitstreams.

FIG. 10 is a block diagram showing a configuration of the decodingapparatus according to the embodiment of the present invention.

A decoding apparatus 1000 of FIG. 10 may further include a predictionblock selection unit 1050 in the decoding apparatus 500 of FIG. 5 .Therefore, components of FIG. 10 are substantially the same as thecomponents mentioned with reference to the operation of FIG. 5 andtherefore, the repeated description thereof will be omitted.

Referring to FIG. 10 , a decoding apparatus 1000 may include an intraprediction unit 1010, a reference image buffer 1020, an entropy decodingunit 1030, a dequantization and inverse transform unit 1040, and anadding unit 1060.

The intra prediction unit 1010 may generate the prediction blocks of thecurrent blocks based on a reference image stored in the reference imagebuffer 1020.

For example, the intra prediction unit 1010 may generate the predictionblocks of the current blocks according to the method for generatingprediction blocks used at the time of generating the prediction blocksof each of the plurality of recovered peripheral blocks.

As another example, the intra prediction unit 1010 may generate theplurality of prediction blocks of the current blocks according to thepredetermined methods for generating the plurality of prediction blocksbased on the number of the methods for generating the prediction blocksused at the time of generating the prediction blocks of the peripheralblocks. Here, as the methods for generating a plurality of predictionblocks, the predefined method for generating the prediction blocks (1)to (5) described in the intra prediction unit 210 of FIG. 2 may be used.

The entropy decoding unit 1030 may demultiplex the bitstreams to extractat least one of the encoded information, the encoded residual blocks,and the encoded prediction block selection information. Further, theentropy decoding unit 1030 may perform the entropy decoding on theencoded information, the encoded residual blocks, and the encodedprediction block selection information.

For example, when the encoding information includes the informationrepresenting that the residual blocks are not encoded, the entropydecoder 1030 may perform the entropy decoding on only the encodedinformation and the encoded prediction block selection information.

As another example, when the encoding information includes theinformation representing that the residual blocks are encoded, theentropy decoder 1030 may perform the entropy decoding on all of theencoded information and the encoded residual blocks, and the encodedprediction block selection information.

The prediction block selection unit 1050 may select any one of at leastone prediction block generated based on the prediction block selectioninformation.

The dequantization and inverse transform unit 1040 may perform thedequnatization and the inverse transform on the residual blocks encodedbased on the encoding information.

For example, when the encoding information includes the informationrepresenting that the residual blocks are encoded, the dequantizationand inverse transform unit 1040 performs the dequantization on theencoded residual block and then performs the inverse transform thereon,thereby recovering the residual block. In this case, when the encodinginformation includes the information representing that the residualblocks are not encoded, the operation of the dequantization and inversetransform unit 1040 may be omitted.

The adding unit 1060 may recover the current block by using at least oneof the recovered residual blocks and the prediction blocks of theselected current blocks.

For example, when the residual blocks are recovered due to the encodinginformation including the information representing that the residualblocks are encoded, the adding unit 1060 may recover the current blocksby adding the recovered residual blocks and the prediction blocks of theselected current blocks.

As another example, when the encoding information includes theinformation that the residual blocks are not encoded, when the operationof the dequantization and inverse transform unit is omitted, the addingunit 1060 may recover the current blocks by using the prediction blocksof the selected current blocks. Then, the recovered image configured byonly the prediction blocks of the current blocks may be displayed.

Then, the reference image buffer 1020 may store the recovered currentblocks.

FIG. 11 is a flow chart for describing an operation of the decodingapparatus according to the embodiment of the present invention.

First, at S1110, the intra prediction unit 1010 may generate at leastone prediction block of the current blocks.

For example, the intra prediction unit 1010 may generate the predictionblocks of the current blocks according to the method for generatingprediction blocks used at the time of generating the prediction blocksof each of the plurality of recovered peripheral blocks.

As another example, the intra prediction unit 1010 may generate theplurality of prediction blocks of the current blocks according to thepredetermined methods for generating the plurality of prediction blocksbased on the number of the methods for generating the prediction blocksused at the time of generating the prediction blocks of the peripheralblocks.

Then, at S1120, the entropy decoding unit 1030 may demultiplex thebitstreams to extract the encoded information and the encoded predictionblock selection information and may perform the entropy decoding on theencoded information and the encoded prediction block selectioninformation.

In this case, when the encoding information includes the informationrepresenting that the residual block is encoded, the entropy decodingunit 1030 may extract the encoded residual block from the bitstreamsthrough the demultiplexing to perform the entropy decoding.

Then, at S1130, the dequantization and inverse transform unit 1040 mayperform the dequantization and inverse transform on the encoded residualblocks to recover the residual blocks.

Then, at S1140, the prediction block selection unit 1050 may select anyone of the prediction blocks of at least one current block based on theprediction block selection information.

At S1150, the adding unit 1060 may recover the current blocks using atleast one of the prediction blocks of the selected current blocks andthe recovered residual blocks. Then, the reference image buffer 1020 maystore the recovered current blocks.

As another example, when the encoding information includes theinformation that the residual blocks are not encoded, when the operationof the dequantization and inverse transform unit 1040 is omitted, theadding unit 1060 may recover the current blocks by using only theprediction blocks of the selected current blocks. In other words, sincethe encoded residual blocks are not included in the bitstreams, thereare no recovered residual blocks. Therefore, the recovered image may beconfigured by using only the prediction blocks of the current blocksselected based on the prediction block selection information.

As another example, when the encoding information includes theinformation representing that the residual blocks are encoded, when theresidual block is recovered, the adding unit 1060 may recover thecurrent block by adding the selected prediction blocks of the currentblocks and the recovered residual blocks.

Although the exemplary embodiments of the present invention have beendisclosed for illustrative purposes, those skilled in the art willappreciate that various modifications, additions and substitutions arepossible, without departing from the scope and spirit of the inventionas disclosed in the accompanying claims. Accordingly, the scope of thepresent invention is not construed as being limited to the describedembodiments but is defined by the appended claims as well as equivalentsthereto.

The invention claimed is:
 1. A video encoding method using a bitstreamcomprising: generating a prediction block for a current block byperforming prediction for the current block; and generating transformedand quantized residual block information based on a residual block whichis generated using the prediction block for the current block, whereinfor decoding for the current block using the transformed and quantizedresidual block information, a first prediction block for the currentblock is generated based on a prediction block generation method for thecurrent block, wherein for the decoding for the current block, theprediction block generation method for the current block is determinedbased on a plurality of prediction block generation methods for aplurality of adjacent blocks which are spatially adjacent to the currentblock, wherein for the decoding for the current block, the plurality ofthe prediction block generation methods for the plurality of theadjacent blocks are used to generate a plurality of second predictionblocks for the plurality of the adjacent blocks, respectively, whereinfor the decoding for the current block, the prediction block generationmethod for the current block is determined based on the number of one ormore different values of the plurality of the prediction blockgeneration methods for the plurality of the adjacent blocks, wherein thefirst prediction block for the current block is equal to a specificdecoded block indicated by difference information, wherein the bitstreamcomprising the difference information is generated, wherein thedifference information indicates a position difference from a positionof the current block to a position of the specific decoded block,wherein a size of the first prediction block is 16×16, and wherein asize of the specific decoded block is 16×16.
 2. The video encodingmethod of claim 1, further comprising: generating selection informationindicating the prediction block generation method for the current blockused to generate the first prediction block for the current block.
 3. Avideo decoding method comprising: generating a first prediction blockfor a current block by performing prediction for the current block; andgenerating a reconstructed block for the current block based on aresidual block and the first prediction block for the current block,wherein the first prediction block for the current block is generatedbased on a prediction block generation method for the current block,wherein the prediction block generation method for the current block isdetermined based on a plurality of prediction block generation methodsfor a plurality of adjacent blocks which are spatially adjacent to thecurrent block, wherein the plurality of the prediction block generationmethods for the plurality of the adjacent blocks are used to generate aplurality of second prediction blocks for the plurality of the adjacentblocks, respectively, wherein the prediction block generation method forthe current block is determined based on the number of one or moredifferent values of the plurality of the prediction block generationmethods for the plurality of the adjacent blocks, wherein the firstprediction block for the current block is equal to a specific decodedblock indicated by difference information, wherein a bitstream comprisescomprising the difference information is generated, wherein thedifference information indicates a position difference from a positionof the current block to a position of the specific decoded block,wherein a size of the first prediction block is 16×16, and wherein asize of the specific decoded block is 16×16.
 4. The video decodingmethod of claim 3, further comprising: obtaining selection informationfrom the bitstream, wherein the selection information indicates theprediction block generation method for the current block used togenerate the first prediction block for the current block.
 5. Anon-transitory computer-readable medium for storing a bitstream fordecoding a video, the bitstream comprising: transformed and quantizedresidual block information; and difference information, wherein aresidual block is generated based on the transformed and quantizedresidual block information, wherein a reconstructed block for a currentblock is generated based on the residual block and a first predictionblock for the current block, wherein the first prediction block for thecurrent block is generated by performing prediction for the currentblock, wherein the first prediction block is generated based on aprediction block generation method for the current block, wherein theprediction block generation method for the current block is determinedbased on a plurality of prediction block generation methods for aplurality of adjacent blocks which are spatially adjacent to the currentblock, wherein the plurality of the prediction block generation methodsfor the plurality of the adjacent blocks are used to generate aplurality of second prediction blocks for the plurality of the adjacentblocks, respectively, wherein the prediction block generation method forthe current block is determined based on the number of one or moredifferent values of the plurality of the prediction block generationmethods for the plurality of the adjacent blocks, wherein the firstprediction block for the current block is equal to a specific decodedblock indicated by difference information, wherein a bitstreamcomprising the difference information is generated, wherein thedifference information indicates a position difference from a positionof the current block to a position of the specific decoded block,wherein a size of the first prediction block is 16×16, and wherein asize of the specific decoded block is 16×16.
 6. A non-transitorycomputer-readable medium of claim 5, wherein the bitstream furthercomprising: selection information indicating the prediction blockgeneration method for the current block used to generate the firstprediction block for the current block.
 7. The video encoding method ofclaim 1, wherein for the decoding for the current block, the predictionfor the current block and predictions for the plurality of the adjacentblocks are intra predictions.
 8. The video encoding method of claim 7,wherein for the decoding for the current block, the prediction blockgeneration method for the current block is determined based on how manydifferent intra prediction modes are used for intra predictions for theplurality of the adjacent blocks.
 9. The video decoding method of claim1, wherein for the decoding for the current block, whether all of valuesof the plurality of the prediction block generation methods for theplurality of the adjacent blocks are equal or not is determined, andwherein for the decoding for the current block, the prediction blockgeneration method for the current block is determined based on whetherall of the values of the plurality of the prediction block generationmethods for the plurality of the adjacent blocks are equal or not. 10.The video encoding method of claim 1, wherein a plurality of thirdprediction block are generated based on the plurality of the predictionblock generation methods for the plurality of the adjacent blocks,respectively, and wherein the first prediction block for the currentblock is generated based on the plurality of the third predictionblocks.
 11. The video decoding method of claim 3, wherein the predictionfor the current block and predictions for the plurality of the adjacentblocks are intra predictions.
 12. The video decoding method of claim 11,wherein the prediction block generation method for the current block isdetermined based on how many different intra prediction modes are usedfor intra predictions for the plurality of the adjacent blocks.
 13. Thevideo decoding method of claim 3, wherein whether all of intraprediction modes of the plurality of the adjacent blocks are equal ornot is determined, and wherein the prediction block generation methodfor the current block is determined based on whether all of the intraprediction modes of the plurality of the adjacent blocks are equal ornot.
 14. The video decoding method of claim 3, wherein whether all ofvalues of the plurality of the prediction block generation methods forthe plurality of the adjacent blocks are equal or not is determined, andwherein the prediction block generation method for the current block isdetermined based on whether all of the values of the plurality of theprediction block generation methods for the plurality of the adjacentblocks are equal or not.
 15. The video decoding method of claim 3,wherein the specific decoded block is restricted to be comprised in adecoded region of a current picture comprising the current block. 16.The video decoding method of claim 3, wherein a plurality of thirdprediction blocks are generated based on the plurality of the predictionblock generation methods for the plurality of the adjacent blocks,respectively, and wherein the first prediction block for the currentblock is generated based on the plurality of the third predictionblocks.
 17. The video decoding method of claim 16, wherein the firstprediction block is generated using for a weighted sum of the pluralityof the third prediction blocks.